%% samplingFreqHzToSec
%
% Takes in sampling frequency in Hz and converts to seconds
%
%% Syntax
% [SamplingTimeInSec] = SamplingFreqHzToSec(SamplingFrequency)
%
% [sampling_time] = SamplingFreqHzToSec(samplefrequency)
%
%
%% Description
% This function will take in the sampling frequcy in Hz and output the
% sampling frequency in seconds.
%
%% Arguments
%* samplingfreq                  - Double: A double precision number of
%                                        sampling frequency of the signal
%
%% Returns
%* t                             - Double: A nx1 double precision value of
%                                   the sampling frequency in seconds
%
%% Function Side Effects
%* N/A
%
%% Exceptions
%* An error is thrown if input is not of type double
%
%% See Also
% N/A

function [SamplingTimeInSec] = samplingFreqHzToSec(SamplingFrequency)

if isa(SamplingFrequency, 'double') ~=1
    type = class(SamplingFrequency);
    error(sprintf(('Sampling Frequency in Hz is of type %s please change to type double'), type))
    
end

SamplingTimeInSec=1/SamplingFrequency;
end


